home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / LaserWriterIIsc (New GX v1.1) / LaserSCResources.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-15  |  9.0 KB  |  150 lines  |  [TEXT/MPS ]

  1. /* ------------------------------------------------------------------------------
  2. FILENAME
  3.     LaserSCResources.h
  4.  
  5. DESCRIPTION
  6.     This module contains the LaserWriter SC resource constants that
  7.     are common to both the New (QuickDraw GX) API resources (NewAPIResources.r) 
  8.     and the Old (QuickDraw) API resources (OldAPIResources.r).
  9.         
  10. COPYRIGHT
  11.      Copyright Apple Computer, Inc. 1988-1996
  12.      All rights reserved. 
  13.  
  14. MODIFICATION HISTORY
  15.      6/14/96 - cn  - Updated to support Universal Interfaces 2.1.
  16.     
  17. -------------------------------------------------------------------------------- */
  18.  
  19. #ifndef __NEWLWRESOURCES__
  20. #define __NEWLWRESOURCES__
  21.     
  22. // Include the public QuickDraw GX printing files 
  23. // #include <GXPrinting.h>
  24.  
  25.  
  26. /*********************************************************************************
  27.  *                                CONSTANTS                                                              *
  28.  *********************************************************************************/
  29.  
  30. /************* Constants shared among the LaserWriter SC resource files *************/
  31.  
  32. #define    kDrvrCreatorType                'scSC'                            // Creator type of the driver 
  33. #define    kDrvrFileType                    'pdvr'                            // QuickDraw GX drivers have this type 
  34. #define    kDriverName                        "LaserWriter SC"                // Name of the driver (C string) 
  35.  
  36. #define    kBadVersionDLOG                gxPrintingDriverBaseID        // "Driver too new" dialog.
  37.  
  38. #define    kNewPaperTypesID                gxPrintingDriverBaseID        // Starting resource ID of the new API paper types 
  39. #define    kNumNewPaperTypes                5                                    // Number of new API paper type definitions 
  40.  
  41. #define    kOldPaperTypesID                (kNewPaperTypesID + kNumNewPaperTypes + 1)    // Starting resource ID of the new API paper types 
  42. #define    kNumOldPaperTypes                5                                                            // Number of new API paper type definitions 
  43.  
  44. #define    kFirstMsgJumpTableOffset    4                                    // Offset (bytes) into message code segment jump table of first jump table entry 
  45. #define    kNewAPISegmentID                0                                    // Resource ID of code segment containing routines that override new API messages 
  46. #define    kOldAPISegmentID                1                                    // Resource ID of code segment containing routines that override old API messages 
  47.  
  48. #define    kLookRsrcID                        (-4096)                            // Resource ID of the driver's 'look' resource 
  49. #define    kSCSICommRsrcID                (-4095)                            // Resource ID of the driver's SCSI 'comm' resource 
  50. #define    kPrinterShareCommRsrcID        (-4094)                            // Resource ID of the driver's PrinterShare 'comm' resource 
  51.  
  52. #define    kTransmissionStatID                        gxPrintingDriverBaseID + 1    // Resource ID of Page Transmission 'stat' resource 
  53. #define        kWaitingForPaperStatIdx                1                        // Waiting for paper 'stat' list entry 
  54. #define        kSendingPartOfPageStatIdx            2                        // Sending part of a page 'stat' list entry 
  55. #define        kPreparingPartOfPageStatIdx        3                        // Preparing part of a page 'stat' list entry 
  56. #define        kOutOfPaperStatIdx                    4                        // Out of paper 'stat' list entry 
  57. #define        kPaperJamStatIdx                        5                        // Paper jam 'stat' list entry 
  58. #define        kBadPaperCartridgeStatIdx            6                        // Bad paper cartridge 'stat' list entry 
  59. #define        kOpenDoorStatIdx                        7                        // Printer door open 'stat' list entry 
  60. #define        kOpenDoorNoAlertStatIdx                8                        // Printer door open 'stat' list entry 
  61. #define        kPrintTestStatIdx                        9                        // Print test is in progress 'stat' list entry 
  62. #define        kHeatFixingUnitStatIdx                10                        // Fixing unit is being heated 'stat' list entry 
  63. #define        kBadTonerCartridgeStatIdx            11                        // Toner cartridge improperly loaded 'stat' list entry 
  64. #define        kBadTonerCartridgeNoAlertStatIdx    12                        // Toner cartridge improperly loaded 'stat' list entry 
  65. #define        kPrintingPageStatIdx                    13                        // Printing the page 'stat' list entry 
  66. #define        kCantFindPrinterStatIdx                14                        // Can't locate the printer on the SCSI bus 'stat' list entry 
  67. #define        kOpeningConnectionStatIdx            15                        // Opening a connection to the printer 'stat' list entry 
  68.  
  69. #define    kEngineStatusStatID                    gxPrintingDriverBaseID + 2    // Resource ID of Engine Failure 'stat' resource 
  70. #define        kLaserInitFailureStatIdx        1                            // Laser printer engine initialization failed 'stat' list entry 
  71. #define        kDRamFailureStatIdx                2                            // Dynamic RAM test failure 'stat' list entry 
  72. #define        kBadPrintFixStatIdx                3                            // Fixing assembly malfunctioned 'stat' list entry 
  73. #define        kBadLaserStatIdx                    4                            // Laser has malfunctioned 'stat' list entry 
  74. #define        kBadPolyMotorStatIdx                5                            // Polygon motor has malfunctioned 'stat' list entry 
  75. #define        kBadSerialStatIdx                    6                            // Serial communication malfunction 'stat' list entry 
  76. #define        kGenericBadHdwareStatIdx        7                            // Hardware malfunction 'stat' list entry 
  77. #define        kDriverTooNewIdx                    8                            // "Driver too new" entry. 
  78.  
  79. #define    kNoAlertCoolID                            0                            // Resource ID of 'cool' alert that tells Printing Manager not to alert 
  80. #define    kLaserInitFailureCoolID                gxPrintingDriverBaseID + 1    // Resource ID of Laser printer engine initialization failed 'cool' alert (all are relative to gxPrintingDriverBaseID) 
  81. #define    kDRamFailureCoolID                    gxPrintingDriverBaseID + 2    // Resource ID of Dynamic RAM test failure 'cool' alert 
  82. #define    kBadPrintFixCoolID                    gxPrintingDriverBaseID + 3    // Resource ID of Fixing assembly malfunctioned 'cool' alert 
  83. #define    kBadLaserCoolID                        gxPrintingDriverBaseID + 4    // Resource ID of Laser has malfunctioned 'cool' alert 
  84. #define    kBadPolyMotorCoolID                    gxPrintingDriverBaseID + 5    // Resource ID of Polygon motor has malfunctioned 'cool' alert 
  85. #define    kBadSerialCoolID                        gxPrintingDriverBaseID + 6    // Resource ID of Serial communication malfunction 'cool' alert 
  86. #define    kGenericBadHdwareCoolID                gxPrintingDriverBaseID + 7    // Resource ID of Hardware malfunction 'cool' alert 
  87. #define    kPrinterDoorOpenCoolID                gxPrintingDriverBaseID + 8    // Resource ID of Printer door open 'cool' alert 
  88. #define    kBadTonerCartridgeCoolID            gxPrintingDriverBaseID + 9    // Resource ID of Bad toner cartridge 'cool' alert 
  89. #define    kCantFindPrinterCoolID                gxPrintingDriverBaseID + 10    // Resource ID of Can't find printer 'cool' alert 
  90. #define    kBadVersionAlertID                    gxPrintingDriverBaseID + 11    // Resource ID of "Driver Too New" alert.
  91.  
  92. #define    kHwinRsrcID                                (-8192)                    //    Resource ID of 'hwin' help resource used by the driver
  93. #define    kHfdrRsrcID                                (-5696)                    //    Resource ID of 'hfdr' help resource used by the driver
  94. #define    kFinderHelpSTRID                        (gxPrintingDriverBaseID + 1)    //    Resource ID of 'STR ' help resource used by the driver
  95.  
  96. #define    isManualFeed                            true                        // Useful mnemonic for dealing with manual feed jobs 
  97.  
  98.  
  99. /************* Old Style Print Record Constants *************/
  100.  
  101. #define    kPrinterID                        4        // The device ID (upper byte of wDev) for LaserWriter SC 
  102.  
  103. #define    kHorizHighRes                    300    // high resolution horizontally (dpi) 
  104. #define    kHorizHighExactRes            288    // high resolution horizontally (dpi) with exact bitmap scaling
  105. #define    kVertHighRes                    300    // high resolution vertically (dpi) 
  106. #define    kVertHighExactRes                288    // high resolution vertically (dpi)  with exact bitmap scaling
  107.  
  108.  
  109. /****************************************************************
  110. * The imageable area defaults are in 72nds of an inch.             *
  111. * The LaserWriter IISC uses 10.6" x 8"                                 *
  112. * Compatibility Note: Currently, all page sizes are                 *
  113. * calculated without fudge factors.  As a result, they do not    *
  114. * exactly match the sizes in the old drivers.  They will            *
  115. * eventually, and the current method will be used for all new    *
  116. * page sizes and for all new drivers.                                     *
  117. ****************************************************************/
  118.  
  119. #define    kRPageDefault                    0, 0, 762, 576            // Default rPage (top,left,bottom,right) 
  120. #define    kRPaperDefault                    -15, -18, 777, 594    // Default rPaper 
  121.  
  122. /****************************************************************
  123. * The high res page size for the device which has 4x scaling.    *
  124. * Needed in the default print record, but doesn't enter into     *
  125. * any of the calculations at validation or StlDialog time        *
  126. ****************************************************************/
  127.  
  128. #define    kRPageHighExactRes            0, 0, 3168, 2304
  129.  
  130. /****************************************************************
  131. * These fields are also for compatibility.  We don't need any    *
  132. * of them for the new Print Architecture.  If you feel like        *
  133. * it, you can try to define kPatScale to the be the pattern        *
  134. * stretching you will be using.  However, the Imaging Engine    *
  135. * doesn't look at it, since it doesn't need to.                        *
  136. ****************************************************************/
  137.  
  138. #define    kPatScale                        -4        // Pattern scaling factor (-4 means 4x, no bit thinning). 
  139.                                                         //    It's obsolete under the new printing architecture 
  140. #define    kULThick                            0        // Underline thickness factor. 
  141.                                                         //    It's obsolete under the new printing architecture 
  142. #define    kULOffset                        0        // Underline offset factor. 
  143.                                                         //    It's obsolete under the new printing architecture 
  144. #define    kULShadow                        0        // Underline shadow factor. 
  145.                                                         //    It's obsolete under the new printing architecture 
  146. #define    kScanDirection                    0        // How the page is printed (top to bottom). 
  147.                                                         //    It's obsolete under the new printing architecture 
  148.  
  149. #endif __NEWLWRESOURCES__
  150.